package com.yb.oldlearning;

/**
 * 使用Thread驱动Runnable对象的导出类
 * the most basic use of thread
 * @author yanbiao
 */
public class BasicThreads {
	public static void main(String[] args) {
		Thread thread = new Thread(new LiftOff());
		thread.start();
		System.out.println("waiting for LiftOff!");
	}
}

/*
 * output
	waiting for LiftOff!
	#0(9)
	#0(8)
	#0(7)
	#0(6)
	#0(5)
	#0(4)
	#0(3)
	#0(2)
	#0(1)
	#0(LiftOff!)
  *说明：waiting for消息在LiftOff之前就出现了，原理是main线程启动了LiftOff.run()方法的线程，main线程中的其他操作会继续往后执行
*/

